﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserManage.aspx.cs" Inherits="LB.Web.Admin.Security.UserManage" %>

<%@ Register Assembly="LB.Controls" Namespace="LB.Controls.GridView" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="Stylesheet" href="../Style/Css/Page.css" />
    <%--    <script src="../Style/artDialog/artDialog.js?skin=default" type="text/javascript"></script>
    <script src="../Style/artDialog/plugins/iframeTools.source.js" type="text/javascript"></script>
    
    <script src="../Style/Js/jquery-1.8.3.min.js" type="text/javascript"></script>
    <script src="../Style/Js/Common.js" type="text/javascript"></script>--%>
    <script type="text/javascript">
        $(function () {
            $("#gridmenu a").click(function () {
                var action = getCtlPropertyValue(this, "name");
                exeAction(this, action);
            });
        });

        function exeAction(o, action) {
            switch (action) {
                case "checkall":
                    checkAll(o);
                    break;
                case "add":
                    ExecuteAdd("添加用户", "Security/UserEdit.aspx", 400, 180);
                    break;
                case "del":
                    ExecuteDelete("Callback", "GridView1", "Fguid");
                    break;
                case "edit":
                    ExecuteEdit("编辑用户", "Security/UserEdit.aspx", 400, 180, "GridView1");
                    break;
            }
        }

        function DataSearch() {
            DoPostBack("Callback", 'search');
        }

        function CustomCallback(action) {
            DoPostBack("Callback", action + "_" + GetFguid("GridView1"));
        }

        function EndCustomCallBack(e) {
            //  debugger;
            var data = Dcq.ParseJson(e);
            if (data.Result == "true") {
                art.dialog.tiploading("操作成功！", 2, function () {
                    //  debugger;
                    if (!data.IsRefresh) {
                        DataSearch();
                    }
                });
            }
            else {
                art.dialog.tips("操作失败！", 2);
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <AspNet:LBCustomCallback ID="Callback" runat="server" UseSubmitBehavior="false" OnCustomCallback="LBCustomCallback_CustomCallback"
        EndCallBack="EndCustomCallBack" />
    <div class="container">
        <div class="search">
            <div class="searchtitle">
                姓名
            </div>
            <div class="searchcontent">
                <span>用户名称：</span> <span>
                    <asp:TextBox ID="ctlRealname" runat="server" CssClass="input" Width="150px"></asp:TextBox></span>
                <span>
                    <input id="Button2" type="button" value="查询" onclick="DataSearch()" /></span>
            </div>
        </div>
        <div id="gridmenu">
            <span><a class="chkall" name="checkall">全选</a> <em>|</em><a class="add" name="add">添加</a>
                <em>|</em><a class="del" name="del">删除</a><em>|</em> <a class="edit" name="edit">编辑</a></span>
        </div>
        <asp:ObjectDataSource ID="DataSource" runat="server" DataObjectTypeName="LB.Business.Security.Entities.Base_User"
            SelectCountMethod="GetCount" SelectMethod="GetData" EnablePaging="true" MaximumRowsParameterName="maxRows"
            StartRowIndexParameterName="startIndex" TypeName="LB.Web.Admin.Security.UserManage">
        </asp:ObjectDataSource>
        <cc1:LBGridView ID="GridView1" runat="server" AutoGenerateColumns="False" AllowPaging="true"
            EnableSortingAndPagingCallbacks="true" DataSourceID="DataSource" PageSize="10"
            CssClassMouseOver="RowHover" PagingStyle="Default" Width="100%" ShowCheckbox="true"
            AlternatingRowStyle-CssClass="AlternatingRow">
            <Columns>
                <asp:BoundField DataField="Username" HeaderText="登录名" HeaderStyle-Width="200px" />
                <asp:BoundField DataField="Realname" HeaderText="姓名" HeaderStyle-Width="200px" />
                <asp:BoundField DataField="Description" HeaderText="描述" />
                <asp:BoundField DataField="Status" HeaderText="状态" HeaderStyle-Width="40px" HeaderStyle-HorizontalAlign="Center"
                    ItemStyle-HorizontalAlign="Center" />
                <asp:BoundField DataField="Fguid" HeaderText="Fguid" HeaderStyle-CssClass="hidden"
                    FooterStyle-CssClass="hidden" ItemStyle-CssClass="hidden" />
            </Columns>
            <PagerStyle CssClass="page" />
            <PagerSettings FirstPageText="首页" LastPageText="尾页" Mode="NextPreviousFirstLast"
                NextPageText="下一页" PreviousPageText="上一页" />
        </cc1:LBGridView>
    </div>
    <%-- <div class="navigation">
        首页 &gt; 控制面板 &gt; 管理员管理</div>
    <div class="tools_box">
        <div class="tools_bar">
            <div class="search_box">
                <asp:TextBox ID="txtKeywords" runat="server" CssClass="txtInput"></asp:TextBox>
                <asp:Button ID="btnSearch" runat="server" Text="搜 索" CssClass="btnSearch" />
            </div>
            <a href="javascript:void(0);" onclick="Add()" class="tools_btn"><span><b class="add">
                添加用户</b></span></a> <a href="javascript:void(0);" onclick="Update()" class="tools_btn">
                    <span><b class="edit">编辑用户</b></span></a> <a href="javascript:void(0);" onclick="checkAll(this);"
                        class="tools_btn"><span><b class="all">全选</b></span></a>
            <asp:LinkButton ID="btnDelete" runat="server" CssClass="tools_btn" OnClientClick="return ExePostBack('btnDelete','GridView1', 'Fguid');"
                OnClick="btnDelete_Click"><span><b class="delete">批量删除</b></span></asp:LinkButton>
        </div>
    </div>
    <asp:ObjectDataSource ID="DataSource" runat="server" DataObjectTypeName="LB.Business.Security.Entities.Base_User"
        SelectCountMethod="GetCount" SelectMethod="GetData" EnablePaging="true" MaximumRowsParameterName="maxRows"
        StartRowIndexParameterName="startIndex" TypeName="LB.Web.Admin.Security.UserManage">
    </asp:ObjectDataSource>
    <cc1:LBGridView ID="GridView1" runat="server" AutoGenerateColumns="False" AllowPaging="true"
        EnableSortingAndPagingCallbacks="true" DataSourceID="DataSource" PageSize="10"
        CssClassMouseOver="rowover" PagingStyle="Default" Width="100%" CheckColumnAlign="Left"
        ShowCheckbox="true">
        <Columns>
            <asp:BoundField DataField="Username" HeaderText="登录名" />
            <asp:BoundField DataField="Realname" HeaderText="姓名" />
            <asp:BoundField DataField="Description" HeaderText="描述" />
            <asp:BoundField DataField="Status" HeaderText="状态" />
            <asp:BoundField DataField="Fguid" HeaderText="Fguid" HeaderStyle-CssClass="hidden"
                FooterStyle-CssClass="hidden" ItemStyle-CssClass="hidden" />
        </Columns>
        <PagerStyle CssClass="page" />
        <PagerSettings FirstPageText="首页" LastPageText="尾页" Mode="NextPreviousFirstLast"
            NextPageText="下一页" PreviousPageText="上一页" />
    </cc1:LBGridView>--%>
    </form>
</body>
</html>
